package com.nbsaas.boot.store.rest.resource;

import com.nbsaas.boot.store.api.apis.StoreCheckInApi;
import com.nbsaas.boot.store.data.entity.StoreCheckIn;
import com.nbsaas.boot.store.api.domain.request.StoreCheckInRequest;
import com.nbsaas.boot.store.api.domain.response.StoreCheckInResponse;
import com.nbsaas.boot.store.api.domain.simple.StoreCheckInSimple;
import com.nbsaas.boot.store.rest.convert.StoreCheckInSimpleConvert;
import com.nbsaas.boot.store.rest.convert.StoreCheckInEntityConvert;
import com.nbsaas.boot.store.rest.convert.StoreCheckInResponseConvert;
import com.nbsaas.boot.store.data.repository.StoreCheckInRepository;

import java.io.Serializable;
import com.nbsaas.boot.jpa.data.core.BaseResource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import org.springframework.data.jpa.repository.support.JpaRepositoryImplementation;

import java.util.function.Function;
/**
*   业务接口实现
*/
@Transactional
@Service
public class StoreCheckInResource extends BaseResource<StoreCheckIn,StoreCheckInResponse, StoreCheckInSimple, StoreCheckInRequest>  implements StoreCheckInApi {

    @Resource
    private StoreCheckInRepository storeCheckInRepository;

    @Override
    public JpaRepositoryImplementation<StoreCheckIn, Serializable> getJpaRepository() {
        return storeCheckInRepository;
    }

    @Override
    public Function<StoreCheckIn, StoreCheckInSimple> getConvertSimple() {
        return new StoreCheckInSimpleConvert();
    }

    @Override
    public Function<StoreCheckInRequest, StoreCheckIn> getConvertForm() {
        return new StoreCheckInEntityConvert();
    }

    @Override
    public Function<StoreCheckIn, StoreCheckInResponse> getConvertResponse() {
        return new StoreCheckInResponseConvert();
    }




}


